<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This file documents the use of the GNU compilers.

Copyright © 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>x86 Windows Options (Using the GNU Compiler Collection (GCC))</title>

<meta name="description" content="x86 Windows Options (Using the GNU Compiler Collection (GCC))">
<meta name="keywords" content="x86 Windows Options (Using the GNU Compiler Collection (GCC))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Indices.html" rel="index" title="Indices">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Submodel-Options.html" rel="up" title="Submodel Options">
<link href="Xstormy16-Options.html" rel="next" title="Xstormy16 Options">
<link href="x86-Options.html" rel="prev" title="x86 Options">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
kbd.key {font-style: normal}
span:hover a.copiable-link {visibility: visible}
-->
</style>


</head>

<body lang="en_US">
<div class="subsection-level-extent" id="x86-Windows-Options">
<div class="nav-panel">
<p>
Next: <a href="Xstormy16-Options.html" accesskey="n" rel="next">Xstormy16 Options</a>, Previous: <a href="x86-Options.html" accesskey="p" rel="prev">x86 Options</a>, Up: <a href="Submodel-Options.html" accesskey="u" rel="up">Machine-Dependent Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indices.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsection" id="x86-Windows-Options-1"><span>3.19.55 x86 Windows Options<a class="copiable-link" href="#x86-Windows-Options-1"> &para;</a></span></h4>
<a class="index-entry-id" id="index-x86-Windows-Options"></a>
<a class="index-entry-id" id="index-Windows-Options-for-x86"></a>

<p>These additional options are available for Microsoft Windows targets:
</p>
<dl class="table">
<dt><a id="index-mconsole"></a><span><code class="code">-mconsole</code><a class="copiable-link" href="#index-mconsole"> &para;</a></span></dt>
<dd><p>This option
specifies that a console application is to be generated, by
instructing the linker to set the PE header subsystem type
required for console applications.
This option is available for Cygwin and MinGW targets and is
enabled by default on those targets.
</p>
</dd>
<dt><a id="index-mdll"></a><span><code class="code">-mdll</code><a class="copiable-link" href="#index-mdll"> &para;</a></span></dt>
<dd><p>This option is available for Cygwin and MinGW targets.  It
specifies that a DLL&mdash;a dynamic link library&mdash;is to be
generated, enabling the selection of the required runtime
startup object and entry point.
</p>
</dd>
<dt><a id="index-mnop_002dfun_002ddllimport"></a><span><code class="code">-mnop-fun-dllimport</code><a class="copiable-link" href="#index-mnop_002dfun_002ddllimport"> &para;</a></span></dt>
<dd><p>This option is available for Cygwin and MinGW targets.  It
specifies that the <code class="code">dllimport</code> attribute should be ignored.
</p>
</dd>
<dt><a id="index-mthreads-1"></a><span><code class="code">-mthreads</code><a class="copiable-link" href="#index-mthreads-1"> &para;</a></span></dt>
<dd><p>This option is available for MinGW targets. It specifies
that MinGW-specific thread support is to be used.
</p>
</dd>
<dt><a id="index-municode"></a><span><code class="code">-municode</code><a class="copiable-link" href="#index-municode"> &para;</a></span></dt>
<dd><p>This option is available for MinGW-w64 targets.  It causes
the <code class="code">UNICODE</code> preprocessor macro to be predefined, and
chooses Unicode-capable runtime startup code.
</p>
</dd>
<dt><a id="index-mwin32"></a><span><code class="code">-mwin32</code><a class="copiable-link" href="#index-mwin32"> &para;</a></span></dt>
<dd><p>This option is available for Cygwin and MinGW targets.  It
specifies that the typical Microsoft Windows predefined macros are to
be set in the pre-processor, but does not influence the choice
of runtime library/startup code.
</p>
</dd>
<dt><a id="index-mwindows"></a><span><code class="code">-mwindows</code><a class="copiable-link" href="#index-mwindows"> &para;</a></span></dt>
<dd><p>This option is available for Cygwin and MinGW targets.  It
specifies that a GUI application is to be generated by
instructing the linker to set the PE header subsystem type
appropriately.
</p>
</dd>
<dt><a class="index-entry-id" id="index-fset_002dstack_002dexecutable"></a>
<a id="index-fno_002dset_002dstack_002dexecutable"></a><span><code class="code">-fno-set-stack-executable</code><a class="copiable-link" href="#index-fno_002dset_002dstack_002dexecutable"> &para;</a></span></dt>
<dd><p>This option is available for MinGW targets. It specifies that
the executable flag for the stack used by nested functions isn&rsquo;t
set. This is necessary for binaries running in kernel mode of
Microsoft Windows, as there the User32 API, which is used to set executable
privileges, isn&rsquo;t available.
</p>
</dd>
<dt><a class="index-entry-id" id="index-fwritable_002drelocated_002drdata"></a>
<a id="index-fno_002dwritable_002drelocated_002drdata"></a><span><code class="code">-fwritable-relocated-rdata</code><a class="copiable-link" href="#index-fno_002dwritable_002drelocated_002drdata"> &para;</a></span></dt>
<dd><p>This option is available for MinGW and Cygwin targets.  It specifies
that relocated-data in read-only section is put into the <code class="code">.data</code>
section.  This is a necessary for older runtimes not supporting
modification of <code class="code">.rdata</code> sections for pseudo-relocation.
</p>
</dd>
<dt><a id="index-mpe_002daligned_002dcommons"></a><span><code class="code">-mpe-aligned-commons</code><a class="copiable-link" href="#index-mpe_002daligned_002dcommons"> &para;</a></span></dt>
<dd><p>This option is available for Cygwin and MinGW targets.  It
specifies that the GNU extension to the PE file format that
permits the correct alignment of COMMON variables should be
used when generating code.  It is enabled by default if
GCC detects that the target assembler found during configuration
supports the feature.
</p></dd>
</dl>

<p>See also under <a class="ref" href="x86-Options.html">x86 Options</a> for standard options.
</p>
</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Xstormy16-Options.html">Xstormy16 Options</a>, Previous: <a href="x86-Options.html">x86 Options</a>, Up: <a href="Submodel-Options.html">Machine-Dependent Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indices.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
